package Others.DesignPattern.ObserverPattern.Pattern.Object;

import lombok.Data;
import lombok.EqualsAndHashCode;


@EqualsAndHashCode(callSuper = true)
@Data
public class ColleagueB extends Observer {

    public ColleagueB(String name, Secretary secretary){
        this.name = name;
        this.sub = secretary;
    }

    @Override
    public void update() {
        System.out.println( sub.getMessage() + name + " 关闭NBA直播，继续工作！ ");
    }
}
